Learning Objectives

After completing this lesson, you’ll be able to:

Self-Serve and Parameters

Parameters control how FME operates: how data is read in, transformed and written out using various FME components. This lesson will explain the different types of published parameters available within FME as well as go through an example on how to create a published parameter. Workspace parameters are the key to giving the end-user control over self-serve workspaces.

What are Parameters?

Parameters are what control FME translations and transformations. Remember that a translation has a hierarchy of different translation components:

Workspace hierarchy

Each different level of the hierarchy has a set of parameters that belong to it. That means there are:

Most of the available parameters are determined by the author of the workspace.

Note

Order food at a restaurant and the chef will decide how long it needs to be cooked, at what temperature, and using what equipment. They will also decide the amount of seasoning it needs and what plate to present it on. Like an FME author, these are the parameters that control the results, and as the creator of the meal I get to choose how best to set them.

Published Parameters

Although workspace authors set most of the parameters, in some cases, the end-user needs to be able to set some of them.

Note

To continue the restaurant metaphor: of course, the chef will let you have some decisions on your meal. For example, they'll let you decide how your steak should be cooked - rare, medium, or well done - and what sauce you wish to add. They'll also let you select the side dishes. These are the parameters in FME that the user gets to wield instead of the author.

To enable users to select the requirements for their translation, FME includes functionality called user parameters. User parameters are methods for getting input into a workspace.

When a user parameter is made available to the end-user, it is called a published parameter. In a self-serve application, published parameters are important for letting the end-user control how the data is served.

Parameter Uses in FME Server

For self-serve systems, published parameters are most commonly used to set:

With FME Server, the key to successful workspace authoring is flexibility. Workspaces need to be flexible to allow end-users to make choices without seeing all of the complexity of the workspace or the data behind it. Parameters are one way to accomplish this.

Types of Published Parameters

There are two types of published parameters in FME: FME parameters and user parameters.

FME Parameters are built into the FME Workbench interface and directly control the translation. Examples of FME Parameters include the WHERE clause, Search Envelope coordinates, and Character Encoding.

FME ParametersFME Parameters User Parameters, as the name suggests, are intended for a workspace user. These parameters are created by the workspace author for user input in the translation. These can be tied to an FME parameter, giving a user limited control over readers, transformers, or writers. User Parameters can be linked to provide values to transformers and attributes in a workspace.

There are two types of User Parameters, published and private. A published parameter is visible by the end-user, while a private parameter is visible by the author creating the workspace. User Parameters are optional by default. Setting a parameter to be not optional means a user must enter a value otherwise FME will not run the translation.

Viewing a user parameter in the Navigator

A published and private user parameter. Note the lock icon on the private parameter.

Any parameter in FME can be published and presented to the user as a choice to be made when running a workspace.

Note

Parameters are published in FME Workbench for use on FME Server, but the Translation Parameter Values dialog will prompt the user to supply values to published parameters even when running on FME Desktop. 

You will recognize this dialog, as it appears by default when you press the Run button in any workspace that has a reader and/or writer. The dialog appears because readers and writers automatically have a published parameter for their source or destination file path, letting the user choose which data to use/create at runtime.

Publishing a Parameter

In FME Workbench, parameters are located in several places, but the FME Workbench Navigator window is the one place where you will find them gathered in a single location:

Parameters in the Navigator

As you can see, there are parameters for the source data location (1) and the destination dataset (2), which is the one that the Data Download service overrides. There are also parameters for controlling the coordinate system (3), general Reader and Writer parameters (4), parameters for each feature type (5), and parameters for transformers (6).

Parameters are published by right-clicking on them and choosing “Create User Parameter.” For example, here a workspace author is publishing a parameter on the AreaCalculator transformer:

Creating a User Parameter from an FME parameter

The author gets to choose if the parameter will be published or private, if it will be required to run the workspace, the user prompt, and the default value.

When the workspace is run on FME Server the end-user will now be able to decide what value to use:

Published Parameters in FME Server

Transformer parameters can also be published directly in transformer dialogs:

Creating a User Parameter from a transformer parameter

When you create a user parameter this way, FME will automatically choose the options available to the user. You can see that the options for the AreaCalculator's Type parameter, Plane Area or Sloped Area, are automatically created. Creating user parameters this way is fast and you are guaranteed that whatever input the user chooses will be valid. 

However, it can also create problems. For example, if you wanted to create a user parameter for a numerical value (e.g., the Bufferer's Buffer Distance), by default the user could enter any numerical value. You might prefer to do some validation by restricting the options. In order to accomplish this, you can create your own user parameter using the Parameter Manager, explained below.

The Parameter Manager

You can add, configure, reorder, and group parameters in the Parameter Manager dialog. You can access the Parameter Manager by right-clicking User Parameters in the Navigator and choosing Manage User Parameters...

Manage User Parameters option in the Navigator

Note

In FME 2021.0, we have introduced a new way to manage and work with user parameters in FME Desktop. For information on creating parameters in FME 2020 and older, please see Introduction to Published Parameter.

Support for groups in FME Server will be coming in a future release. For now, parameters within groups appear as ungrouped parameters.

Parameter Manager Overview

Parameter Manager overview

The left-hand side of the Parameter Manager is where all of your created parameters are shown, as well as options to add new ones, copy and paste, reorder and delete. 

The right-hand side is the parameters for the newly created or selected parameter.

Note

The right side is similar to how you would have created or edited parameters in past versions of FME (2020.2 or older), with some slight modifications in wording.

Creating User Parameters

To create a new user parameter in the Parameter Manager you first click the Plus icon in the top-left of the dialog. Then, choose a parameter type:

Creating a user parameter in the Parameter Manager

Note

You'll learn more about these different types in a later lesson, Choose the Correct Parameter Type.

After choosing your parameter type, you can configure the new parameter on the right side of the dialog.

Filling out the right side of the Parameter Manager

While the exact configuration varies by parameter type, the shared options include:

After configuring your user parameter you can click OK to close the dialog or the plus to add another. You can use the other buttons to move and remove parameters.

The Parameter Manager buttons

Linking User Parameters

After creating user parameters using the Parameter Manager, they will appear in the Navigator under User Parameters. At this point, the user parameter exists, but it does not actually control anything. To use it to control your workspace, you need to link it to a parameter elsewhere in the workspace. Find the parameter, right-click it, and choose User Parameter > Link to User Parameter. Here we are linking a Text user parameter named Delimiter to the Delimiter Character parameter of a CSV reader:

Linking an FME parameter to a user parameter

You can also link user parameters directly in transformer dialogs using the drop-down arrow and choosing User Parameter:

Linking to a user parameter from a transformer dialog

Comparison of Parameters Before and After 2021.0

Note

User parameter configuration changed with the release of FME 2021.0. If you have not used versions of FME prior to 2021.0, you can skip this section.

Overall, user parameters still function the same, and the end-user will have the same experience, but now as a user parameter author, you will have a few more options to fine-tune your parameters.